#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<stdlib.h>
int main()
{
	char a[100000] = { 0 };
	int t = 0, l = 0, d = 0, s = 0, o = 0;
	printf("string:");
	gets(a);
	while (a[0] != '\0')
	{
		t = 0, l = 0, d = 0, s = 0, o = 0;
		for (int i = 0; a[i] != '\0'; i++) {
			if (a[i] >= 65 && a[i] <= 90 || a[i] >= 97 && a[i] <= 122) {
				l += 1;
			}
			else if (a[i] >= 48 && a[i] <= 57) {
				d += 1;
			}
			else if (a[i] == 32) {
				s += 1;
			}
			else {
				o += 1;
			}
			t += 1;
		}
		printf("total=%d\nletter=%d,digit=%d,space=%d,others=%d\n", t, l, d, s, o);
		printf("string:");
		gets(a);
	}
	printf("Bye!\n");
	return 0;
}